#include <iostream>
using namespace std;

const static double PI=3.14;
class Shape{
public:
	virtual double Area()=0;
	virtual void Show()=0;
	void Display(){
		cout<<Area()<<endl;
	}
};

class Circle:public Shape{
public:
	Circle();
	Circle(double r):_r(r){};
	virtual ~Circle(){};
	double Area(){
		return PI*_r*_r;
	}
	
	void Show(){
		cout<<"circle"<<endl;
	}
private:
	double _r;
};

class Triangle:public Shape{
public:
	Triangle();
	Triangle(double length,double height):_length(length),_height(height){};
	virtual ~Triangle(){};
	double Area(){
		return 0.5*_length*_height;
	}
	
	void Show(){
		cout<<"triangle"<<endl;
	}
private:
	double _length,_height;
};

int main()
{
	Circle c(2);
	Triangle tri(1.1,2.1);
	tri.Display();
	
}

